package cn.qh.com.config;

import java.util.Date;

import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class pageConfig {


    @Bean
    //乐观锁
    public OptimisticLockerInterceptor optimisticLockerInterceptor() {
        return new OptimisticLockerInterceptor();
    }


    @Bean
    //分页
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}

